package edu.aynu.entity;

import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * (Cloze)实体类
 *
 * @author haha
 * @since 2021-05-20 14:37:13
 */
@ToString
@Document(indexName = "cloze", shards = 3, replicas = 1)
public class Cloze implements Serializable {
    private static final long serialVersionUID = 853982389117501994L;

    @Id
    private Integer id;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String subject;

    @Field(type = FieldType.Keyword, index = false)
    private String answer;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

}
